package com.centit.suixuan.puremvc.model
{
	import com.centit.suixuan.puremvc.view.LoginMediator;
	
	import org.puremvc.as3.interfaces.IProxy;
	import org.puremvc.as3.patterns.proxy.Proxy;

	public class UserProxy extends Proxy implements IProxy
	{
		public function UserProxy(proxyName : String = null, data : Object = null)
		{
			super(proxyName, data);
				
		}
		
		public static const NAME:String = "UserProxy";
		
		
		public function login(user : User) : void{
			if("admin" == user.username){
				this.sendNotification(LoginMediator.LOGIN_SUCCESSFUL, data);
			}else{
				this.sendNotification(LoginMediator.LOGIN_ERROR, data);
			}
		}
	}
}